package it.das;

/**
 * 
 * @author ad
 * 
 * AppServices is the contract or API of the underlying application 
 * called "App". 
 * 
 * Application "App" logically is a SET of services. 
 *
 */
public interface AppServices {

	/*
	 * NOTE: Varargs methods accept zero or more arguments of a specified type.
	 * Correct way to work with Varags:
	 * 	int sum = 0;
	 *  for (int arg : args){
	 *  	sum += arg;
	 *  }
	 *  return sum;
	 * In this way if args in null sum is 0, if Input is someMethod(1, 2, 3) Output is 6
	 * P.S. Varargs has a performance impact.
	 * Hence it is to be used judiciously.
	 * Example: 
	 * DONOT do this:
	 *  if (args.length == 0)
	 *  	throw new IllegalArgumentException("Too few arguments");
	 *  else
	 *  	continue
	 * ..x
	 */
	public Object doService(Object... args);
}
